/*
 *   A task scheduler that implements Monte-Carlo simulation
 *
 *   Copyright (C) 2011 Systasis Computer Systems, Inc.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *   
 *   $Id: MyModule.java 99 2011-08-21 20:13:48Z jchimene@gmail.com $
 */
package com.systasis.sked.client.gin;

import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
import com.gwtplatform.mvp.client.gin.DefaultModule;
import com.systasis.sked.client.placeManager.MyPlaceManager;
import com.systasis.sked.client.presenter.AboutPresenter;
import com.systasis.sked.client.presenter.ActivityPresenter;
import com.systasis.sked.client.presenter.GanttPresenter;
import com.systasis.sked.client.presenter.HelpPresenter;
import com.systasis.sked.client.presenter.MainPagePresenter;
import com.systasis.sked.client.presenter.MenuPresenter;
import com.systasis.sked.client.presenter.SettingsPresenter;
import com.systasis.sked.client.view.AboutView;
import com.systasis.sked.client.view.ActivityView;
import com.systasis.sked.client.view.GanttView;
import com.systasis.sked.client.view.HelpView;
import com.systasis.sked.client.view.MainPageView;
import com.systasis.sked.client.view.MenuView;
import com.systasis.sked.client.view.SettingsView;

public class MyModule extends AbstractPresenterModule {

    @Override
    protected void configure() {
	install(new DefaultModule(MyPlaceManager.class));

	// Presenters
	// Don't forget the AsyncProvider<> in MyGinjector.java
	bindPresenter(SettingsPresenter.class //
		, SettingsPresenter.MyView.class //
		, SettingsView.class //
		, SettingsPresenter.MyProxy.class);
	
	bindPresenter(MainPagePresenter.class //
		, MainPagePresenter.MyView.class //
		, MainPageView.class //
		, MainPagePresenter.MyProxy.class);

//	bindSingletonPresenterWidget(GanttPresenter.class //
//		, GanttPresenter.MyView.class //
//		, GanttView.class);

	bindPresenter(GanttPresenter.class //
		, GanttPresenter.MyView.class //
		, GanttView.class //
		, GanttPresenter.MyProxy.class);

	bindPresenter(ActivityPresenter.class //
		, ActivityPresenter.MyView.class //
		, ActivityView.class //
		, ActivityPresenter.MyProxy.class);

	bindPresenter(MenuPresenter.class //
		, MenuPresenter.MyView.class //
		, MenuView.class //
		, MenuPresenter.MyProxy.class);

	bindPresenter(HelpPresenter.class //
		, HelpPresenter.MyView.class //
		, HelpView.class //
		, HelpPresenter.MyProxy.class);

	bindPresenter(AboutPresenter.class //
		, AboutPresenter.MyView.class //
		, AboutView.class //
		, AboutPresenter.MyProxy.class);
    }
}